package com.gitee.jmliu1983.finacehelper.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.domain.BaseEntity;
//import com.ruoyi.common.core.annotation.Excel;
//import com.ruoyi.common.core.web.domain.BaseEntity;
import com.ruoyi.common.annotation.Excel;

/**
 * 个人持仓记录对象 transactions_fund
 * 
 * @author ruoyi
 * @date 2025-02-27
 */
public class TransactionsFund extends BaseEntity {
	private static final long serialVersionUID = 1L;

	/** 交易唯一标识 */
	private Long transactionId;

	/** 关联用户表 */
	@Excel(name = "关联用户表")
	private Long userId;

	/** 关联账户表 */
	@Excel(name = "关联账户表")
	private Long accountId;

	/** 关联产品表 */
	@Excel(name = "关联产品表")
	private String productId;

	/** $column.columnComment */
	@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
	private Date submitTime;

	/** 交易时间 */
	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "Asia/Shanghai")
	@Excel(name = "交易时间", width = 30, dateFormat = "yyyy-MM-dd")
	private Date confirmDate;

	/** "是否已清仓（Pre: 待确认，Buy/Sell/Dividend） */
	@Excel(name = "是否已清仓", readConverterExp = "P=re:,待=确认，Buy/Sell/Dividend")
	private String soldOff;

	/** 单价（每股/每份价格） */
	@Excel(name = "单价", readConverterExp = "每=股/每份价格")
	private BigDecimal price;

	/** 数量（股数/份额） */
	@Excel(name = "数量", readConverterExp = "股=数/份额")
	private BigDecimal quantity;

	/** 总金额（quantity * price） */
	@Excel(name = "总金额", readConverterExp = "q=uantity,*=,p=rice")
	private BigDecimal amount;

	/** 手续费 */
	@Excel(name = "手续费")
	private BigDecimal fee;

	/** 交易价格使用的日期 */
	@JsonFormat(pattern = "yyyy-MM-dd")
	@Excel(name = "交易价格使用的日期", width = 30, dateFormat = "yyyy-MM-dd")
	private Date priceDate;

	/** 与哪个账户进行转账 */
	@Excel(name = "与哪个账户进行转账")
	private String transWith;

	/** $column.columnComment */
	@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
	private String comment;

	/** 交易类型（Pre: 待确认，Buy/Sell/Dividend） */
	@Excel(name = "交易类型", readConverterExp = "P=re:,待=确认，Buy/Sell/Dividend")
	private String type;

	public void setTransactionId(Long transactionId) {
		this.transactionId = transactionId;
	}

	public Long getTransactionId() {
		return transactionId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public Long getUserId() {
		return userId;
	}

	public void setAccountId(Long accountId) {
		this.accountId = accountId;
	}

	public Long getAccountId() {
		return accountId;
	}

	public void setProductId(String productId) {
		this.productId = productId;
	}

	public String getProductId() {
		return productId;
	}

	public void setSubmitTime(Date submitTime) {
		this.submitTime = submitTime;
	}

	public Date getSubmitTime() {
		return submitTime;
	}

	public void setConfirmDate(Date confirmDate) {
		this.confirmDate = confirmDate;
	}

	public Date getConfirmDate() {
		return confirmDate;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getType() {
		return type;
	}

	public void setPrice(BigDecimal price) {
		this.price = price;
	}

	public BigDecimal getPrice() {
		return price;
	}

	public void setQuantity(BigDecimal quantity) {
		this.quantity = quantity;
	}

	public BigDecimal getQuantity() {
		return quantity;
	}

	public void setAmount(BigDecimal amount) {
		this.amount = amount;
	}

	public BigDecimal getAmount() {
		return amount;
	}

	public void setFee(BigDecimal fee) {
		this.fee = fee;
	}

	public BigDecimal getFee() {
		return fee;
	}

	public void setPriceDate(Date priceDate) {
		this.priceDate = priceDate;
	}

	public Date getPriceDate() {
		return priceDate;
	}

	public void setTransWith(String transWith) {
		this.transWith = transWith;
	}

	public String getTransWith() {
		return transWith;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}

	public String getComment() {
		return comment;
	}

	public void setSoldOff(String soldOff) {
		this.soldOff=soldOff;
	}

	public String getSoldOff() {
		return soldOff;
	}

	@Override
	public String toString() {
		return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("transactionId", getTransactionId())
				.append("userId", getUserId()).append("accountId", getAccountId()).append("productId", getProductId())
				.append("submitTime", getSubmitTime()).append("confirmDate", getConfirmDate()).append("type", getType())
				.append("price", getPrice()).append("quantity", getQuantity()).append("amount", getAmount())
				.append("fee", getFee()).append("priceDate", getPriceDate()).append("transWith", getTransWith())
				.append("comment", getComment()).toString();
	}
}
